<template>
  <view>
    <view class="">
      <up-tabs :list="list1" @click="tabHandle"></up-tabs>
    </view>

    <view v-if="currentTab === 0"><shop></shop></view>
    <view v-if="currentTab === 1"><run></run></view>
    <view v-if="currentTab === 2"><coupon></coupon></view>
  </view>
  <!-- 全局组件 -->
  <FloatingBall />
  <AiChat />
</template>

<script setup>
import { ref } from 'vue';

// 控制AI对话框显示状态
const showAiDialog = ref(false);
// 顶部标签
const list1 = [
  { name: '闲置' },
  { name: '跑腿' },
  { name: '积分兑换' }
];

// 顶部标签序号
const currentTab = ref(0);

// 点击标签事件
const tabHandle = (item) => {
  currentTab.value = item.index;
};

</script>

<style lang="scss">

</style>